<template>
<div id="" class="handleBtn">
  <el-button @click="onEdit(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundEdit') && (rowData.status == 5 || rowData.status == 50 || !rowData.status)">
    编辑
  </el-button>
  <el-button @click="onDelete(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundDelete') && (rowData.status == 5 || rowData.status == 50 || !rowData.status)">
    删除
  </el-button>
  <el-button @click="onShow(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundShow')">
    查看
  </el-button>
  <el-button @click="onConfirm(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundConfirm') && rowData.hold1 == '0'">
    校验
  </el-button>
  <el-button @click="onPublish(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundPublish') && (rowData.status == 5 || rowData.status == 50 || !rowData.status)">
    发布
  </el-button>
  <el-button @click="onOffLine(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundPublish') && rowData.status == 10">
    下线
  </el-button>
  <el-button @click="onCancel(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundConfirm') && rowData.hold1 == '1'">
    取消校验
  </el-button>
  <el-button @click="onQuickEdit(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundEdit')">
    快捷编辑
  </el-button>
  <el-button @click="onActivity(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundEdit')">
    活动管理
  </el-button>
  <el-button @click="onLog(rowData)" type="text" :size="defaultFormItemSize">打卡记录</el-button>
  <el-button @click="onPreview(rowData)" type="text" :size="defaultFormItemSize" v-if="checkPermCodeExist('ground:ground:groundShow')">预览</el-button>
</div>
</template>
<script>
export default {
  name: "",
  props: ['rowData'],
  data() {
    return {}
  },
  methods: {
    onEdit() {
      this.$emit("onEdit", this.rowData)
    },
    onDelete() {
      this.$emit("onDelete", this.rowData)
    },
    onShow() {
      this.$emit("onShow", this.rowData)
    },
    onConfirm() {
      this.$emit("onConfirm", this.rowData)
    },
    onPublish() {
      this.$emit("onPublish", this.rowData)
    },
    onOffLine() {
      this.$emit("onOffLine", this.rowData)
    },
    onCancel() {
      this.$emit("onCancel", this.rowData)
    },
    onActivity() {
      this.$emit("onActivity", this.rowData)
    },
    onLog() {
      this.$emit("onLog", this.rowData)
    },
    onPreview() {
      this.$emit("onPreview", this.rowData)
    },
    onQuickEdit(){
      this.$emit("onQuickEdit", this.rowData)
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
